package org.fatmansoft.teach.entity.ViewEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.fatmansoft.teach.entity.ViewEntity.PracticeInfo.StudentPractice;

import javax.persistence.*;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "student_leaving_info")
public class StudentLeavingInfo {
    //    学生外出离校信息
    //    前端建表：学号，学生姓名，外出地点，外出时间，返校时间
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;  //ID

    @ManyToOne
    @JoinColumn(name = "s_id")
    private Student student;

    private String outingLocation;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date outingTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date comingTime;


}
